home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
IRIX Base Documentation 1998 November
/
IRIX 6.5.2 Base Documentation November 1998.img
/
usr
/
share
/
catman
/
p_man
/
cat3
/
rmtops.z
/
rmtops
Wrap
Text File
|
1998-10-20
|
7KB
|
133 lines
RRRRMMMMTTTTOOOOPPPPSSSS((((3333)))) RRRRMMMMTTTTOOOOPPPPSSSS((((3333))))
NNNNAAAAMMMMEEEE
rmtops - remote tape drive access routines
SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
iiiinnnntttt rrrrmmmmttttaaaacccccccceeeessssssss((((cccchhhhaaaarrrr ****ppppaaaatttthhhh,,,, iiiinnnntttt aaaammmmooooddddeeee))));;;;
iiiinnnntttt rrrrmmmmttttcccclllloooosssseeee((((iiiinnnntttt ffffiiiillllddddeeeessss))));;;;
iiiinnnntttt rrrrmmmmttttccccrrrreeeeaaaatttt((((cccchhhhaaaarrrr ****ppppaaaatttthhhh,,,, iiiinnnntttt mmmmooooddddeeee))));;;;
iiiinnnntttt rrrrmmmmttttffffssssttttaaaatttt((((iiiinnnntttt ffffiiiillllddddeeeessss,,,, ssssttttrrrruuuucccctttt ssssttttaaaatttt ****bbbbuuuuffff))));;;;
iiiinnnntttt rrrrmmmmttttiiiiooooccccttttllll((((iiiinnnntttt ffffiiiillllddddeeeessss,,,, iiiinnnntttt rrrreeeeqqqquuuueeeesssstttt,,,, iiiinnnntttt aaaarrrrgggg))));;;;
iiiinnnntttt rrrrmmmmttttooooppppeeeennnn((((cccchhhhaaaarrrr ****ppppaaaatttthhhh,,,, iiiinnnntttt ooooffffllllaaaagggg,,,, iiiinnnntttt mmmmooooddddeeee))));;;;
iiiinnnntttt rrrrmmmmttttrrrreeeeaaaadddd((((iiiinnnntttt ffffiiiillllddddeeeessss,,,, cccchhhhaaaarrrr ****bbbbuuuuffff,,,, uuuunnnnssssiiiiggggnnnneeeedddd iiiinnnntttt nnnnbbbbyyyytttteeee))));;;;
iiiinnnntttt rrrrmmmmttttwwwwrrrriiiitttteeee((((iiiinnnntttt ffffiiiillllddddeeeessss,,,, cccchhhhaaaarrrr ****bbbbuuuuffff,,,, uuuunnnnssssiiiiggggnnnneeeedddd iiiinnnntttt nnnnbbbbyyyytttteeee))));;;;
DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
_R_m_t_o_p_s provides a simple means of transparently accessing tape drives on
remote machines over a network, via _r_s_h(1) and _r_m_t(1M). This version of
the library expects the remote _r_m_t program to be version 2, which is
fairly widespread. These routines are used like their corresponding
system calls, but allow the user to open up a tape drive on a remote
system on which he or she has an account and the appropriate remote
permissions. rmtaccess() always returns 0 in the remote case, since the
protocol doesn't support this concept, deferring access errors until the
rmtopen or rmtcreat.
A remote tape drive file name has the form
[user@]_s_y_s_t_e_m:/_d_e_v/???
where _s_y_s_t_e_m is the remote system, /_d_e_v/??? is the particular drive on
the remote system (raw, blocked, rewinding, non-rewinding, etc.), and the
optional _u_s_e_r is the login name to be used on the remote system, if
different from the current user's login name. This corresponds to the
remote syntax used by _r_c_p(1). Note that the remote device must in fact
be a device, and must reside below /dev on the remote system.
The routines differentiate between local and remote file descriptors by
adding a bias to the file descriptor of the pipe. The programmer, if he
must know if a file is remote, should use the _i_s_r_m_t function. Up to 4
remote devices may be in simultaneous use by one program at the same
time.
FFFFIIIILLLLEEEESSSS
////uuuussssrrrr////lllliiiibbbb////lllliiiibbbbrrrrmmmmtttt....aaaa
Contains the remote tape library. To include the library with a
program, add the flag -_l_r_m_t to the _c_c(1) command line.
SSSSEEEEEEEE AAAALLLLSSSSOOOO
_r_c_p(1), _r_s_h(1), _r_m_t(2), and the appropriate system calls in section 2.
PPPPaaaaggggeeee 1111
RRRRMMMMTTTTOOOOPPPPSSSS((((3333)))) RRRRMMMMTTTTOOOOPPPPSSSS((((3333))))
DIAGNOSTICS
Several of these routines will return -1 and set _e_r_r_n_o to EOPNOTSUPP, if
they are given a remote file name or a file descriptor on an open remote
file (e.g., _r_m_t_d_u_p).
BBBBUUUUGGGGSSSS
See diagnostics above. It is to be hoped that true remote file systems
will eventually appear, and eliminate the need for these routines.
There is no way to use remote tape drives with the _s_t_d_i_o(3) package with
the current implementation.
The _r_m_t(1m) protocol is not very capable. In particular, it relies on
TCP/IP sockets for error free transmission, and does no data validation
of its own.
The _r_m_t program allows no more than 10K bytes to be transferred at one
time. The rmtread and rmtwrite routines will transfer data in multiple
chunks if necessary to meet this requirement, and the rmt program on the
remote will reassemble the data and pass it via the read and write system
calls as a single system call.
OOOORRRRIIIIGGGGIIIINNNNAAAALLLL AAAAUUUUTTTTHHHHOOOORRRRSSSS
This set of routines is passed on a package posted to the Usenet group
comp.sources.unix, circa 1989. Further changes, particularly to the
rmtioctl code, were made at Silicon Graphics.
Jeff Lee (gatech!jeff) wrote the original routines for accessing tape
drives via _r_m_t(1m).
Fred Fish (unisoft!fnf) redid them into a general purpose library.
Arnold Robbins (gatech!arnold) added the ability to specify a user name
on the remote system, this man page, and cleaned up the library a little.
PPPPaaaaggggeeee 2222